package com.ruoyi.question.domain;

import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

/**
 * 答案对象 dt_answer
 *
 * @author llc
 * @date 2025-01-06
 */
@Data
@AllArgsConstructor
@NoArgsConstructor
public class DtAnswer extends BaseEntity {
    private static final long serialVersionUID = 1L;

    /**
     * 答案ID
     */
    private Long id;

    /**
     * 题目ID
     */
    @Excel(name = "题目ID")
    private Long questionId;

    /**
     * 答案内容
     */
    @Excel(name = "答案内容")
    private String content;

    /**
     * 是否正确答案（true为正确，false为错误）
     */
    @Excel(name = "是否正确答案", readConverterExp = "t=rue为正确，false为错误")
    private Integer isCorrect;

    /**
     * 逻辑删除(0-未删除,1-已删除)
     */
    @Excel(name = "逻辑删除(0-未删除,1-已删除)")
    private Integer isDeleted;

    /**
     * 题目详情
     */
    @Excel(name = "题目详情")
    private DtQuestion dtQuestion;


    /**
     * 查询参数：题目内容
     */
    @Excel(name = "题目内容")
    private String title;



    @Override
    public String toString() {
        return new ToStringBuilder(this, ToStringStyle.MULTI_LINE_STYLE)
                .append("id", getId())
                .append("questionId", getQuestionId())
                .append("content", getContent())
                .append("isCorrect", getIsCorrect())
                .append("isDeleted", getIsDeleted())
                .toString();
    }
}
